Show:

Q viewport Class

This plugin enables the user to move & scale content inside a container using the mouse and mousewheel, or touches on a touchscreen.

Constructor

Q viewport

(
  • [options]
)

Parameters:

  • [options] Object optional

    this object contains function parameters

    • [containerClass] String optional

      any class names to add to the actions container

    • [initial] Object optional

      can be used to set initial bounds of content to display inside tool.

      • [x] Object optional
        horizontal midpoint, from 0 to 1
      • [y] Object optional
        horizontal midpoint, from 0 to 1
      • [scale] Object optional
        initial scale
    • [onRelease] Q.Event optional

      This event triggering after viewport creation

    • [onScale] Q.Event optional

      Occurs when the user scales the content

    • [onMove] Q.Event optional

      Occurs when user moves the content around

    • [onUpdate] Q.Event optional

      Occurs when the selection changes in any way

Item Index